#include "File.h"

File::File(string name)
{
  file.open(name.c_str(), ifstream::out);
  if(!file.is_open())
    throw new Exception("File \"" + name + "\" does not exists !");
}

File::~File()
{
  file.close();
}

string File::toString()
{
  string content = "";
  string line = "";
  while(getline(file,line))
    content += line;
  return content;
}
